package com.hlf.robot.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName robot_signin
 */
@TableName(value ="robot_signin")
@Data
public class RobotSignin implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 签到qq号
     */
    private String signinQq;

    /**
     * 签到日期
     */
    private Date signlnDate;

    /**
     * 签到天数
     */
    private Integer signlnDay;

    /**
     * 签到qq姓名
     */
    private String signinQqName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        RobotSignin other = (RobotSignin) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getSigninQq() == null ? other.getSigninQq() == null : this.getSigninQq().equals(other.getSigninQq()))
            && (this.getSignlnDate() == null ? other.getSignlnDate() == null : this.getSignlnDate().equals(other.getSignlnDate()))
            && (this.getSignlnDay() == null ? other.getSignlnDay() == null : this.getSignlnDay().equals(other.getSignlnDay()))
            && (this.getSigninQqName() == null ? other.getSigninQqName() == null : this.getSigninQqName().equals(other.getSigninQqName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSigninQq() == null) ? 0 : getSigninQq().hashCode());
        result = prime * result + ((getSignlnDate() == null) ? 0 : getSignlnDate().hashCode());
        result = prime * result + ((getSignlnDay() == null) ? 0 : getSignlnDay().hashCode());
        result = prime * result + ((getSigninQqName() == null) ? 0 : getSigninQqName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", signinQq=").append(signinQq);
        sb.append(", signlnDate=").append(signlnDate);
        sb.append(", signlnDay=").append(signlnDay);
        sb.append(", signinQqName=").append(signinQqName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}